package com.xbongbong.paas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;
import com.xbongbong.paas.enums.clazz.SeparatorClass;
import java.util.ArrayList;
import java.util.List;

/**
 * @author: wufeng
 * @date: 2018/8/22 15:17
 * @desrcption: 分割线枚举类
 */
public enum SeparatorEnum {

    /**
     * 虚线
     */
    DASHED("dashed", "enum.separator.name.dashed"),
    /**
     * 细的实线
     */
    THIN("this", "enum.separator.name.thin"),
    /**
     * 粗的实线
     */
    THICK("thick", "enum.separator.name.thick"),
    /**
     * 无线
     */
    NOTHING("nothing", "enum.separator.name.nothing");

    private String type;

    private String name;

    SeparatorEnum(String type, String name){
        this.name = name;
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return I18nMessageUtil.getMessage(name);
    }

    public void setName(String name) {
        this.name = name;
    }

    public static List<SeparatorClass> list(){
        List<SeparatorClass> list = new ArrayList<>();
        for(SeparatorEnum s : values()){
            SeparatorClass separatorClass = new SeparatorClass();
            separatorClass.setName(s.getName());
            separatorClass.setType(s.getType());
            list.add(separatorClass);
        }
        return list;
    }
}
